/*
 * @Author: your name
 * @Date: 2022-01-26 09:36:03
 * @LastEditTime: 2022-03-30 10:41:16
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \my-react-app\src\App.tsx
 */
import { useState, useMemo } from 'react'
import { Button } from 'antd'
import styles from '@/App.module.less'
import { useAppSelector, useAppDispatch } from '@/store/hooks'
import { add } from '@/store/action'
console.log(styles);

function App() {
	const total = useAppSelector(state => state.total)
	const dispatch = useAppDispatch()
	return (
		<div className={styles.App}>
			<Button
				type='primary'
				onClick={() => {
					dispatch(add({ type: 'ADD', data: 100 }))
				}}>
				{total}
			</Button>
		</div>
	)
}

export default App
